package com.ibeetl.cms.service;

import java.util.List;

import com.ibeetl.cms.entity.HighlevelTalents;
import com.ibeetl.cms.entity.IndustrialTalents;
import com.ibeetl.cms.entity.Site;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibeetl.admin.core.util.PlatformException;

import com.ibeetl.cms.dao.SiteFundsDao;
import com.ibeetl.cms.entity.SiteFunds;
import com.ibeetl.admin.core.service.BaseService;

/**
 * SiteFunds Service
 */

@Service
@Transactional
public class SiteFundsService extends BaseService<SiteFunds>{

    @Autowired private SiteFundsDao siteFundsDao;

    public PageQuery<SiteFunds>queryByCondition(PageQuery query){
        PageQuery ret =  siteFundsDao.queryByCondition(query);
        queryListAfter(ret.getList());
        return ret;
    }

    public void batchDelSiteFunds(List<Long> ids){
        try {
            siteFundsDao.batchDelSiteFundsByIds(ids);
        } catch (Exception e) {
            throw new PlatformException("批量删除SiteFunds失败", e);
        }
    }


    //查申报数据
    public PageQuery<SiteFunds>querydata(PageQuery query){
        PageQuery ret =  siteFundsDao.querydata(query);
        queryListAfter(ret.getList());
        return ret;
    }

    //查审核数据
    public PageQuery<SiteFunds>queryExamine(PageQuery query){
        PageQuery ret =  siteFundsDao.queryExamine(query);
        queryListAfter(ret.getList());
        return ret;
    }

    public PageQuery<SiteFunds> queryDoneTask(PageQuery page) {
        PageQuery ret =  siteFundsDao.queryDoneTask(page);
        queryListAfter(ret.getList());
        return ret;

    }

    //查询站点名称
    public List<Site> getSite(){
        return  siteFundsDao.getSite();
    }

    //根据id搜索站点信息
    public Site findSite(Integer id){
        return  siteFundsDao.findSite(id);
    }

}